Faithful (meta-)encodings of programmable strategies into term rewriting systems

نویسندگان

  • Horatiu Cirstea
  • Sergueï Lenglet
  • Pierre-Etienne Moreau
چکیده

Rewriting is a formalism widely used in computer science and mathematical logic. When using rewriting as a programming or modeling paradigm, the rewrite rules describe the transformations one wants to operate and rewriting strategies are used to control their application. The operational semantics of these strategies are generally accepted and approaches for analyzing the termination of specific strategies have been studied. We propose in this paper a generic encoding of classic control and traversal strategies used in rewrite based languages such as Maude, Stratego and Tom into a plain term rewriting system. The encoding is proven sound and complete and, as a direct consequence, established termination methods used for term rewriting systems can be applied to analyze the termination of strategy controlled term rewriting systems. We show that the encoding of strategies into term rewriting systems can be easily adapted to handle many-sorted signatures and we use a meta-level representation of terms to reduce the size of the encodings. The corresponding implementation in Tom generates term rewriting systems compatible with the syntax of termination tools such as AProVE and TTT2, tools which turned out to be very effective in (dis)proving the termination of the generated term rewriting systems. The approach can also be seen as a generic strategy compiler which can be integrated into languages providing pattern matching primitives; experiments in Tom show that applying our encoding leads to performances comparable to the native Tom strategies.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A faithful encoding of programmable strategies into term rewriting systems

Rewriting is a formalism widely used in computer science and mathematical logic. When using rewriting as a programming or modeling paradigm, the rewrite rules describe the transformations one wants to operate and declarative rewriting strategies are used to control their application. The operational semantics of these strategies are generally accepted and approaches for analyzing the terminatio...

متن کامل

Stratego/XT An Annotated Bibliography

The first ideas about programmable rewriting strategies supporting generic term traversal were developed in the algebraic specification formalism ASF+SDF [3]. That paper introduces the 2 (all) and 3 (one) traversal primitives, and their use in the definition of full term traversals such as bottomup, topdown, and innermost. The calculus of strategy operators is further developed and formalized u...

متن کامل

A Logic for Rewriting Strategies

As term-rewriting has matured, with applications in areas such as automatic program transformation, the necessity of programmed control for applying rules has become apparent. Early term-rewriting systems used a xed strategy, such as innermost-leftmost matching, choosing among possibly overlapping rules nondeterministically. This mode of control is su cient for a con uent, terminating system of...

متن کامل

Verifying heterogeneous multi-agent programs

We present a new approach to verifying heterogeneous multi-agent programs — multi-agent systems in which the agents are implemented in different (BDI-based) agent programming languages. Our approach is based on meta-APL, a BDI-based agent programming language that allows both an agent’s plans and its deliberation strategy to be encoded as part of the agent program. The agent programs comprising...

متن کامل

Internal strategies in a rewriting implementation of tile systems

Tile logic extends rewriting logic, taking into account rewriting with side-eeects and rewriting synchronization. Since rewriting logic is the semantic basis of several language implementation eeorts, it is interesting to map tile logic back into rewriting logic in a conservative way, to obtain executable speciications of tile systems. The resulting implementation requires a meta-layer to contr...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Logical Methods in Computer Science

دوره 13  شماره 

صفحات  -

تاریخ انتشار 2017